package com.ruibang.glass.portal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.ruibang.glass.common.domain.DictInfo;
import com.ruibang.glass.portal.domain.DeptBase;
import com.ruibang.glass.portal.entity.DeptEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeptMapper extends BaseMapper<DeptEntity> {

	/**
	 * 根据部门id获取部门信息
	 * @param deptId
	 * @return
	 */
	DeptEntity getDept(@Param("deptId") String deptId);
	
	/**
	 * 获取部门信息list
	 * @param dept
	 * @return
	 */
	List<DeptEntity> getDeptList(DeptEntity dept);

	/**
	 * 更新部门
	 * @param deptEntity
	 */
	void updateDeptById(DeptEntity deptEntity);


	void deleteDeptById(String deptId);

	List<DeptBase> getParentByDeptId(@Param("deptId") String deptId);

	List<DictInfo> getByDeptIds(@Param("deptIds") List<String> deptIds);

	List<DeptEntity> getDeptByIds(@Param("deptIds") List<String> deptIds);

	List<String> getUserIdsByDeptIds(@Param("deptIds") List<String> deptIds);

	List<DeptEntity> getEquipmentDept();
}
